
from pydantic import Field
from core.llm.base_analyze import BaseAnalyzer
from core import prompt_dir


class AmbiguityReviewer(BaseAnalyzer):

    def __init__(self):
        super().__init__(prompt_file=prompt_dir / '歧义性审查.md')

    def invoke(
            self,
            contract_content: str = Field(description="合同正文内容")
    ):
        prompt = self.template_prompt.format(
            inputs={
                "contract_content": contract_content
            },
            remove_template_variables=True
        )
        data = self.analyze(prompt)
        return data